﻿<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="LoginForm.ascx.vb" Inherits="Core.LoginForm" %>
<div id="notLoginCus" runat="server" visible="false">
    <script language="javascript">
        function showFormLogin() {
            $("#frmLogin").fadeToggle("fast", function () {
                if ($("#frmLogin").css("display") == 'none') {
                    //$("#spLogin").css("border", "none");
                    //$("#spLogin").css("margin-right", "0px");
                    $("#spLogin").removeClass("spLoginActive");
                    $("#spLogin").addClass("spLoginInactive");
                } else {
                    //$("#spLogin").css("border", "1px #A51A16 solid");
                    //$("#spLogin").css("border-bottom", "1px #fff solid");
                    //$("#spLogin").css("margin-right", "-1px");
                    //$("#spLogin").css("background-color", "#fff");
                    $("#spLogin").removeClass("spLoginInactive");
                    $("#spLogin").addClass("spLoginActive");

                }
            });
        }
    </script>
    <div class="formLogin" id="frmLogin">
	<!--span class="closeFormLogin" onclick="showFormLogin()"></span-->
        <table class="tblLogin">
		    <tr>
			    <td style="padding-left: 10px;">Tài khoản</td>
			    <td><asp:TextBox ID="txtUser" runat="server" CssClass="txtLogin"></asp:TextBox></td>
		    </tr>
		    <tr>
			    <td style="padding-left: 10px;">Mật khẩu</td>
			    <td><asp:TextBox ID="txtPassword" runat="server" CssClass="txtLogin" TextMode="Password"></asp:TextBox></td>
		    </tr>
		    <tr>
			    <td></td>
			    <td>
                    <asp:Button ID="btnLogin" runat="server" Text="Đăng nhập" class="btnInput submitType small"  />
				    <input type="button" class="btnInput cancelType small" value="Đóng" style="width:45px;" onclick="showFormLogin()">
			    </td>
		    </tr>
	    </table>
    </div>
    <span id="spLogin" onclick="showFormLogin()">Đăng nhập</span> | <span onclick="window.location='/Register.aspx'">Đăng ký</span>
</div>

<div id="doLoginCus" runat="server" visible="false" style="padding-bottom: 10px;">
    <script type="text/javascript" language="javascript">
        function showFormCus() {
            $("#formCusProfile").fadeToggle("fast", function () {
                if ($("#formCusProfile").css("display") == 'none') {
                    $("#ctl00_frmLogin_spFullname").removeClass("spCusActive");
                    $("#ctl00_frmLogin_spFullname").addClass("spCusInactive");
                } else {
                    $("#ctl00_frmLogin_spFullname").removeClass("spCusInactive");
                    $("#ctl00_frmLogin_spFullname").addClass("spCusActive");
                }
            });
        }
        $("#spFullname").addClass("spCusActive");
    </script>
    <div class="formCusProfile" id="formCusProfile">
	<!--span class="closeFormLogin" onclick="showFormLogin()"></span-->
    <table class="tblProfile">
		<tr>
			<td style="padding-top: 5px;"><a href="/Profile.aspx">Thông tin cá nhân</a></td>
		</tr>
        <tr>
			<td style="padding-top: 5px;"><a href="/CusBillManager.aspx">Quản lý đơn hàng</a></td>
		</tr>
        <tr>
			<td style="padding-left: 0px;"><asp:Button ID="btnLogout" runat="server" Text="Thoát !!" CssClass="btnLogout" /></td>
		</tr>
	</table>
    </div>
    <span style="left:27px;">Xin chào, </span><span onclick="showFormCus()" style="left:75px;" id="spFullname" runat="server"></span>
</div>

